package net.csdn.business.common.feign.mirror.config;

import feign.Logger;
import feign.codec.ErrorDecoder;
import net.csdn.business.common.feign.config.SystemFeignErrorDecoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * @author likun
 * @date 2023/2/3 11:33
 */
@Configuration
public class MirrorFeignConfiguration {
    @Bean
    @Profile(value = {"dev", "test", "pre"})
    public Logger.Level logLevel() {
        return Logger.Level.FULL;
    }

    @Bean
    public ErrorDecoder decoder() {
        return new SystemFeignErrorDecoder();
    }
}